#ifndef HTTPCLIENTVIEW_H
#define HTTPCLIENTVIEW_H

#include <QTimer>
#include <QWidget>
#include "HttpClient.h"

namespace Ui {
class HttpClientView;
}

class HttpClientView : public QWidget
{
    Q_OBJECT

public:
    explicit HttpClientView(QWidget *parent = 0);
    ~HttpClientView();

private:
    void init();
    void initUI();
    void initSlot();

private slots:
    void onBtnExecuteClicked();
    void onBtnClearClicked();
    void onBtnCopyClicked();

    void onBtnDecodeClicked();
    void onBtnClear_2Clicked();
    void onBtnCopy_2Clicked();
    void onBtnAuto1Clicked();
    void onBtnAuto2Clicked();

    void postFinishSlot(QString url,int statusCode, QByteArray& response);
    void httpErrorSlot(QNetworkReply::NetworkError err);
    void onTimer();
    void onHideTip();
private:
    Ui::HttpClientView *ui;
    HttpClient *mHttpClient;
    QTimer *timer;
};

#endif // HTTPCLIENTVIEW_H
